package com.ganbo.dingding.controller;

import com.ganbo.dingding.service.GroupMessageService;
import com.ganbo.dingding.vo.SendGroupMessageReq;
import com.ynt.pay.common.utils.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 钉钉群消息
 *
 * @Author: ganbo
 * @Date: 2019/12/2 16:28
 */
@RestController
@RequestMapping("/api")
public class GroupMessageController {

    @Autowired
    GroupMessageService groupMessageService;


    /**
     * 发送钉钉群消息
     *
     * @param req
     * @return
     */
    @PostMapping("/sendGroupMessage")
    public ResponseData sendGroupMessage(@Valid @RequestBody SendGroupMessageReq req) {
        return groupMessageService.sendGroupMessage(req);
    }


}
